// @ts-ignore
/* eslint-disable */
import request from "@/plugins/globalRequest";

/** 添加种植户种植地点信息 POST /admin/insertPlantLocationInfo */
export async function insertPlantLocationInfoUsingPOST(
  body: API.PlantingLocation,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/admin/insertPlantLocationInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 条件分页查询种植地点信息 POST /admin/pageQueryPlantLocation */
export async function pageQueryPlantLocationUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.pageQueryPlantLocationUsingPOSTParams,
  body: API.PlantLocationDTO,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultIPagePlantLocationVO_>('/plantingLocation/pageQueryPlantLocation', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据种植地点ID查询当前种植地点的所有肥料记录 GET /admin/queryFertilizerByPlantLocationID/${param0} */
export async function queryFertilizerByPlantLocationIDUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryFertilizerByPlantLocationIDUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultIPageFertilizationDetails_>(
    `/admin/queryFertilizerByPlantLocationID/${param0}`,
    {
      method: 'GET',
      params: {
        // currentPage has a default value: 1
        currentPage: '1',
        // pageSize has a default value: 10
        pageSize: '10',
        ...queryParams,
      },
      ...(options || {}),
    },
  );
}

/** 根据种植地点id查询某一具体果蔬的环境监测数据 GET /admin/queryVegByEnvMonitoring/${param0} */
export async function queryVegByEnvMonitoringUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryVegByEnvMonitoringUsingGETParams,
  options?: { [key: string]: any },
) {
  const { locationId: param0, ...queryParams } = params;
  return request<API.BaseResultListVegEnvMonitoring_>(`/admin/queryVegByEnvMonitoring/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 更新种植地点信息 POST /admin/updatePlantLocationInfo */
export async function updatePlantLocationInfoUsingPOST(
  body: API.PlantingLocation,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/admin/updatePlantLocationInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
